<style lang="less">
	/*@import '../../../styles/common.less';*/
	
	@import './work-flow.less';
</style>

<template>
	<div>
		<Row>
			
			<Card>
				 <Col span="12">
				<div >
					<Form :model="user" :label-width="80">
					<FormItem label="帐号">
						<Input v-model="user.username" placeholder=""></Input>
					</FormItem>
					<FormItem label="密码">
						<Input v-model="user.password" placeholder=""></Input>
					</FormItem>
					<FormItem label="重复输入密码">
						<Input v-model="user.password" placeholder=""></Input>
					</FormItem>
					</Form>
				</div>				 	
				 	
	
				<Form :model="formItem" :label-width="80">
					<FormItem label="公司名称">
						<Input v-model="detail.organization_name" placeholder=""></Input>
					</FormItem>
					<FormItem label="公司企业编码/统一信用识别码
">
						<Input v-model="formItem.input" placeholder=""></Input>
					</FormItem>
					<FormItem label="所属行业">
						<Select v-model="formItem.select">
							<Option value="0">酒店</Option>
							<Option value="1">物业</Option>
						</Select>
					</FormItem>
					<FormItem label="公司性质">
						<Select v-model="formItem.select">
							<Option value="0">连锁酒店</Option>
							<Option value="1">独自经营</Option>
						</Select>
					</FormItem>
					<FormItem label="酒店名称">
						<Input v-model="formItem.input" placeholder=""></Input>
					</FormItem>
					<FormItem label="酒店地址">
						<v-distpicker :province="detail.organization_province" :city="select.organization_street" :area="select.area"></v-distpicker>
						<Input v-model="formItem.input" placeholder="详细地址"></Input>
					</FormItem>
					<FormItem label="联系人">
						<Input v-model="formItem.input" placeholder=""></Input>
					</FormItem>
					<FormItem label="手机号码">
						<Input v-model="formItem.input" placeholder=""></Input>
					</FormItem>
					<FormItem label="验证码">
						<Input v-model="formItem.input" placeholder=""></Input>
						<Button type="primary">发送短信</Button>
					</FormItem>
					<FormItem label="推荐人工号">
						<Input v-model="formItem.input" placeholder=""></Input>
					</FormItem>
					<FormItem>
						<Button type="primary">Submit</Button>
						<Button type="ghost" style="margin-left: 8px">Cancel</Button>
					</FormItem>
				</Form>
			
				</Col>
					<Steps :current="currentStep" :status="status">
					<Step v-for="item in stepList1" :title="item.title" :content="item.describe + '审核并通过'" :key="item.title"></Step>
				</Steps>
			</Card>
		</Row>
	</div>
</template>

<script>
	import VDistpicker from 'v-distpicker'
	export default {
		name: 'workflow',
		data() {
			return {
				placeholders: {
              province: '------- 省 --------',
              city: '--- 市 ---',
              area: '--- 区 ---',
          },
				formItem: {
					input: '',
					select: '',
					radio: 'male',
					checkbox: [],
					switch: true,
					date: '',
					time: '',
					slider: [20, 50],
					textarea: ''
				},
				"detail": {
					"business_license": "http://www.baidu.com/a.jpg",
					"contact": "王哲",
					"email": "1048808795@qq.com",
					"enterprise_city": 5,
					"enterprise_county": 1,
					"enterprise_name": "华住酒店集团",
					"enterprise_nature": 1,
					"enterprise_province": 0,
					"enterprise_street": "虹桥路2266号",
					"hotel_star": 1,
					"id": 0,
					"industry": 1,
					"organization_city": 4,
					"organization_county": 6,
					"organization_name": "汉庭酒店(武林广场店)",
					"organization_province": 2,
					"organization_street": "体育场路426号",
					"phone": "13838384384",
					"social_credit_code": "123456789876543210"
				},
				"referrer": {
					"id": 0,
					"referrer": "1008"
				},
				"user": {
					"id": 0,
					"password": "hzgkw123456",
					"username": "hzgkw12"
				},

				stepList1: [],
				stepData: {
					title: '',
					describe: '',
					content: ''
				},
				step: {
					opinion: '',
					remark: '',
					pass: '通过'
				},
				stepRules: {
					opinion: [{
						required: true,
						message: '请填写意见',
						trigger: 'blur'
					}]
				},
				hasSubmit: false,
				currentStep: 0,
				status: 'wait'
			};
		},
		methods: {
			handleSubmit() {
				this.$refs['step'].validate((valid) => {
					if(valid) {
						if(this.step.pass === '通过') {
							this.currentStep += 1;
						} else {
							this.status = 'error';
						}
						this.hasSubmit = true;
					}
				});
			}
		},
		mounted() {
			this.stepList1 = [{
					title: '注册',
					describe: ''
				},
				{
					title: '详细信息',
					describe: ''
				}
			];
			this.stepData = {
				title: '七.一建党节庆祝活动申报',
				describe: '申报人：孙二',
				content: ''
			};
			this.currentStep = 0;
			
		},
		components: {
			VDistpicker
		}
	};
</script>